package com.feihao.zhou.demo02_Map;

import java.lang.ref.SoftReference;
import java.util.HashMap;

public class TestMapKeTang {
    public static void main(String[] args) {
        HashMap<Integer, String> map = new HashMap<>();
        map.put(44, "来打");
        map.put(48, "laifu");
        map.put(88, "㸆㸆");

        //键找值
        String s = map.get(44);
        System.out.println(s);

        //map大小
        int size = map.size();
        System.out.println(size);
        //是否包含key
        boolean b = map.containsKey(44);
        System.out.println(b);
        String s1 = map.remove(44);

        map.put(44, "8854");
        System.out.println(map.get(44));
        //清空集合
        map.clear();

        //判断集合是否为空
        boolean empty = map.isEmpty();
        System.out.println(empty);


    }
}
